﻿@model _PLATFORM.DATA.PRODUCT

@{
    ViewBag.Title = "Delete";
}

    <div id="subNav">
        <ul>
    	    <li>@Html.ActionLink("Systems Management", "IndexList", "TruckingSystem")</li>
            @if(ViewBag.ProductType == "Component"){
                <li class="select">@Html.ActionLink("Component Management", "Index", "Component", new { productType = "Component" }, null)</li>
                <li>@Html.ActionLink("Spare Part Management", "Index", "Component", new { productType = "SparePart" }, null)</li>            
            }
            else{
                <li>@Html.ActionLink("Component Management", "Index", "Component", new { productType = "Component" }, null)</li>
                <li class="select">@Html.ActionLink("Spare Part Management", "Index", "Component", new { productType = "SparePart" }, null)</li>
            }
        </ul>
    </div>

    @if (ViewBag.ProductType == "Component")
    {
        <br /><h2>Component Management</h2>
    }
    else
    { 
        <br /><h2>Spare Part Management</h2>
    }

<div id="subNav2">
    <ul>
        @if (ViewBag.ProductType == "Component")
        {
            <li>@Html.ActionLink("Current Components", "Index", "Component", new { productType = "Component" }, null)</li>
            <li>@Html.ActionLink("Create New Component", "Create", "Component", new { productType = "Component" }, null)<img src="../../Assets/images/add_icon.gif" alt="Add" /></li>
            <li>@Html.ActionLink("Manage Component Selections", "Index", "SelectionOption", new { productType = "Component" }, null)</li>
        }
        else
        {
            <li>@Html.ActionLink("Current Spare Parts", "Index", "Component", new { productType = "Sparepart" }, null)</li>
            <li>@Html.ActionLink("Create New Spare Part", "Create", "Component", new { productType = "Sparepart" }, null)<img src="../../Assets/images/add_icon.gif" alt="Add" /></li>
            <li>@Html.ActionLink("Manage Spare Part Selections", "Index", "SelectionOption", new { productType = "Sparepart" }, null)</li>
        }
    	
        <li  class="select"><a href="#">Delete</a></li>
    </ul>
</div>

    <div id="lowerContainer">
		<div id="lowerContainerInner">

            @using (Html.BeginForm()) {
            
            <h3>Are you sure you want to delete this?</h3>
            <br style="clear:both;" />
                
            <fieldset>
		        <table id="tableMgmt" style="width: 100%;">
		            <tr>
			            @if (ViewBag.ProductType == "Component")
                        {
                            <td class="td160"><b>Component Name</b></td>
                        }
                        else { 
                            <td class="td160"><b>Spare Part Name</b></td>
                        }
			            <td>@Html.DisplayFor(model => model.NAME)</td>
		            </tr>
		            <tr>
			            <td><b>Image</b></td>
			            <td>
				            @{
                                var itemName = @Html.DisplayFor(model => model.NAME);
                                var imageName = @Html.DisplayFor(model => model.IMAGE);
                                var path = Url.Content("~/Content/User/Images/" + imageName);
                            }
                            @Html.Image(path, @itemName + " image.", new { style = "width:100px;height:75px;", id="CurrentImage" })
			            </td>
		            </tr>
		            <tr>
			            <td><b>Cost</b></td>
			            <td>@Html.DisplayFor(model => model.COST)</td>
		            </tr>
		            <tr>
			            <td><b>Price</b></td>
			            <td>@Html.DisplayFor(model => model.PRICE)</td>
		            </tr>
		            <tr>
			            <td><b>Part Number</b></td>
			            <td>@Html.DisplayFor(model => model.PART_NUMBER)</td>
		            </tr>
                    <tr>
			            <td><b>Supplier</b></td>
			            <td>@Html.DisplayFor(model => model.SUPPLIER.NAME)</td>
		            </tr>
		            <tr>
			            <td>
				            <b>Lead Time</b>
			            </td>
			            <td>
				            @Html.DisplayFor(model => model.LEAD_TIME, new { style = "width: 147px;" })
				            @*@Html.DropDownList("leadTypes", ViewBag.LeadTypes as SelectList, new {style = "width:50px;"}) *@
			            </td>
		            </tr>
		            <tr>
			            <td><b>Inventory</b></td>
			            <td>@Html.DisplayFor(model => model.INVENTORY)</td>
		            </tr>
                    
                    
                               
		            <tr>
			            <td><b>Statistical Numbers</b></td>
			            <td>@Html.DisplayFor(model => model.STATISTICS)</td>
		            </tr>
		            <tr>
			            <td><b>Description</b></td>
			            <td>@Html.DisplayFor(model => model.DESCRIPTION)</td>
		            </tr>
                    <tr>
			            <td></td>
			            <td><input type="submit" value="Delete" class="button default btnLarge" /><a href="../../Component?productType=Component" class="button cancel btnLarge">Cancel</a></td>
		            </tr>
	            </table>
	        </fieldset>

            }
        </div>
    </div>